﻿<div style="background:#fff;">

<div>

<table border="1" style="width:100%;">

<tr>
<td style="width:180px; vertical-align:top;"><a href="#{link}" class="frmLink" loadto="frmMain1" nolayout=3>链接1</a></td>
<td id="frmMain1"></td>
</tr>

<tr>
<td style="width:180px; vertical-align:top;""><a href="#{link2}" class="frmLink" loadto="frmMain2" nolayout=3>链接2</a></td>
<td id="frmMain2"></td>
</tr>

</table>

</div>

<div style="width2:800px;padding:50px;">

    <div style="margin:20px;">
    frm:
    <a href="#{link}" class="frmBox" xwidth="800" xheight="550" title="xxxxxxAAAAA">这是frmA的链接，请点击</a>
    </div>
    
    <div id="lnkUrl" style="margin:10px auto; width:500px; border:1px #ccc outset; cursor:pointer;">点击能够改变url吗？</div>
    <div id="txtMsg" style="margin:10px auto; width:500px; border:1px #ccc outset; cursor:pointer;">每个网址的值：初始值</div>


</div>

</div>

<script>

    var showObj = function( obj ) {
        alert( '这是在父窗口中调用：id=' + obj.id + ',title=' + obj.title + ',body=' + obj.body );
    };
    
    var pageIndex = 0;
    
    _run( function() {
    
        wojilu.ui.frmLink();
    
        $('#lnkUrl').click( function() {
            pageIndex ++;

            var msg = '这是数据：'+pageIndex;

            history.pushState(msg, "", "none.aspx?id="+pageIndex);
            $('#txtMsg').html( '(点击信息)'+msg+ '....url='+window.location.href );   
        });
        
    });
    
    window.onpopstate = function(e) {
        var msg = e.state;
        $('#txtMsg').html( '(后退信息)'+msg+ '....link='+window.location.href  );        
    };     



</script>

<hr />
<div>这里是控制方iframe</div>
<div><iframe src="#{frmX}?frm=true" id="frmX"></iframe></div>

<hr />
<div>这里是被控制方</div>
<div><iframe src="#{frmZ}?frm=true" id="frmZ"></iframe></div>

<hr />